asp net core dependency injection factory with parameters

48

asp net core dependency injection factory with parameters -

services.AddSingleton<ICacheProvider>(provider => new RedisCacheProvider("myPrettyLocalhost:6379"));

services.AddSingleton<ICacheProvider>(new RedisCacheProvider("myPrettyLocalhost:6379"));

Comments

Submit
0 Comments